#ifndef EXTENSION_MANAGER_HPP
#define EXTENSION_MANAGER_HPP

#include <unordered_map>
#include <unordered_set>
#include <vector>
#include "extension/script_base.hpp"
// #include "extension/editor_extensions.hpp"
// #include "extension/function_externsions.hpp"
#include "scripting/scripting_api.h"

struct ExtensionManagerData;
class ExtensionManager {
private:
    ExtensionManager();
    ~ExtensionManager();

    ExtensionManagerData* const d;
public:
    static ExtensionManager& singleton();
    void LoadExtensions() const;
    void FreeExtensions() const;

    // editor extensions
    [[nodiscard]] const std::unordered_set<ScriptPtr*>& getEditorExtension(IEditorScript::EditorTarget target) const;
    [[nodiscard]] const std::unordered_map<size_t, ScriptPtr*>& getFunctionExtensions() const;
};

#endif /* EXTENSION_MANAGER_HPP */
